package mux

import "io"

type Req interface {
	GetString(string) (string, error)
	GetInt(string) (int, error)
	GetInt8(string) (int8, error)
	GetInt16(string) (int16, error)
	GetInt32(string) (int32, error)
	GetInt64(string) (int64, error)
	GetUint(string) (uint, error)
	GetUint8(string) (uint8, error)
	GetUint16(string) (uint16, error)
	GetUint32(string) (uint32, error)
	GetUint64(string) (uint64, error)
	GetFloat32(string) (float32, error)
	GetFloat64(string) (float64, error)
	GetBool(string) (bool, error)
}

type Resp interface {
	Flush(io.Writer, bool)
	WriteResult(interface{})
	WriteKeyvals(...interface{})
	WriteStatus(int, string, ...interface{})
}

type Proto interface {
	NewResponse() Resp
	ReadRequest(*Ctx) (Req, error)
	GetContentType() string
}
